package com.lovo.ssc.dto;/*
 *Created with IntelliJ IDEA
 *Desrciption:
 *@ return:
 *@ author:tr
 */

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@Data
@Document(indexName = "describees_index")//索引
public class WebCommodityDto {

	/**
	 * 商品id
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@Id
	private String CommodityId;

	/**
	 * 商品编号
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "商品编号")
	private String commoditycode;

	/**
	 * 商品名
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "商品名")
	private String commodityname;


	/**
	 * 规格
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "规格")
	private String norms;

	/**
	 * 类型
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "类型")
	private String type;

	/**
	 * 价格
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "价格")
	private Double price;

	/**
	 * 数量
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "数量")
	private Integer number;

	/**
	 * 0-已上架、1-促销中、2-预售商品
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "商品状态")
	private String state;

	/**
	 * 图片路径
	 */
	//不建索引
	@Field(type = FieldType.Keyword)
	@ApiModelProperty(value = "图片路径")
	private List<String> imgpathList;

	/**
	 * 商品描述
	 */
	//建索引
	@Field(type = FieldType.Text)
	@ApiModelProperty(value = "商品描述")
	private String commoditydescribe;

	@Override
	public String toString() {
		return "WebCommodityDto{" +
				"CommodityId=" + CommodityId +
				", commoditycode='" + commoditycode + '\'' +
				", commodityname='" + commodityname + '\'' +
				", norms='" + norms + '\'' +
				", type='" + type + '\'' +
				", price=" + price +
				", number=" + number +
				", state='" + state + '\'' +
				", imgpathList=" + imgpathList +
				", commoditydescribe='" + commoditydescribe + '\'' +
				"/n}";
	}
}
